﻿$(document).ready(function ()//
{
    $(window).on('resize', setCufonFonts);


    //    $(window).scroll(function () {
    //        if ($(window).scrollTop() + $(window).height() > $(document).height() - 100) {
    //            $('body').append("  <div class='alert alert-info'><p>After D put the title os the story</p></div>");
    //        }
    //    });

    setCufonFonts();


});

function setCufonFonts() {

    Cufon.replace('#banner .wrapper .text .first, #banner .wrapper .text .second', {
        fontFamily: 'Helvetica Neue Blk',
        fontSize: getCuffonFontSize(40) + 'px'
    });
    Cufon.replace('#IconMenuHome .text .museo', {
        fontFamily: 'Museo Slab 900',
        fontSize: getCuffonFontSize(30) + 'px'
    });
    Cufon.refresh();
}



function goToCreate(e) {

    if ($("#newIcon").attr('logged'))
        window.location = 'http://' + window.location.host + '/story/create';
    else
        ShowLoginModal('http://' + window.location.host + '/story/create');
}

function goToRead() {
    window.location = 'http://' + window.location.host + '/story';
}